<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

    <div class="header_con">
        <div class="header">
            <div class="welcome fl">欢迎来到天天生鲜!</div>
            <div class="fr">
                <c:choose>
                    <c:when test="${user!=null}">
                        <div class="login_btn fl">
                            欢迎您：<em style="color: red">${user.userName}</em>
                            <span>|</span>
                            <a href="logout">退出登录</a>
                        </div>
                    </c:when>
                    <c:otherwise>
                        <div class="login_btn fl">
                            <a href="login">登录</a>
                            <span>|</span>
                            <a href="register">注册</a>
                        </div>
                    </c:otherwise>
                </c:choose>
                <div class="user_link fl">
                    <span>|</span>
                    <a href="myAddress">用户中心</a>
                    <span>|</span>
                    <a href="showCart">我的购物车</a>
                    <span>|</span>
                    <a href="userCenterOrder">我的订单</a>
                </div>
            </div>
        </div>
    </div>
